using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Weazel.Microblaze.Simulator.Components.Lcd
{
    public partial class LcdWindow : Form
    {
        public Bitmap ResizeBitmap(Bitmap b, int nWidth, int nHeight)
        {
            Bitmap result = new Bitmap(nWidth, nHeight);
            Graphics g = Graphics.FromImage((Image)result);
            g.DrawImage(b, 0, 0, nWidth, nHeight);
            return result;
        }

        public LcdWindow(Bitmap bitmap)
        {
            InitializeComponent();
            this.BackgroundImage = ResizeBitmap(bitmap, Width, Height);
        }
    }
}